import React from 'react';
import { routers } from './pages/router'
import Layout from '@/components/layout/layout'

import './rest.scss'
import { HashRouter as Router, Route, Switch, Redirect } from 'react-router-dom';

export default () => {
  return(
    <Layout>
      <Router>
        <Switch>
            {
              routers.map(item => {
                return <Route key={ item.path } { ...item } />
              })
            }
            <Redirect from='/' to='/home' />
        </Switch>
      </Router>
    </Layout>
  )
}

